﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="Inovout.People"
				        namespace="Inovout.People.Models">

  <class name="Person" table="People_Person">
    <id name="Id" access="field.camelcase"
        column="PersonId" type="Int32">
      <generator class="native" />
    </id>
    <property name="Name" />
    <property name="Email" />
    <property name="QuanPinName"/>
    <property name="JianPinName" />
    
    <set name="Phones"  table="People_Person_Phones"  cascade="save-update" >
      <key column="PersonId" foreign-key="fk_Person_Phone"></key>
      <many-to-many class="Inovout.People.Models.Phone" column="PhoneId"></many-to-many>
    </set>


    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>


